<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no">
    <script src="../vue.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0
        }

        .font-size {
            font-size: 5px;
        }

        .color {
            color: red;
        }
        .imgSize{
            width: 90%;
            height: auto;
            margin-left: 5%;
        }
    </style>
</head>
<body>
<!--v-bing:实现数据的绑定，(也可简写为  :)-->
<div class="content_body">
    <img :src='imgUrl' alt="图片路径有误" :class="imgSize">
    <h1 :class="[fontSize,{color:false}]">{{ name }}</h1>
</div>
<script>
    let app = new Vue({
        el: '.content_body',
        data() {
            return {
                name: '你到底爱不爱我？',
                imgUrl: './a.jpg',
                fontSize: 'font-size',
                color: 'color',
                imgSize:'imgSize'
            }
        }
    })
</script>
</body>
</html>